How to fix error "ld:-lMvCameraControl cannot find libMvCameraControl library" when compiling?

How to fix error "ld:-lMvCameraControl cannot find libMvCameraControl library" when compiling?

Cause

The environment variables of current console do not take effect after installation.

Solution

  1. Check if all SDK environment variables take effect by executing:

    echo $MVCAM_COMMON_RUNENV

    If the path to relative SDK is not printed, you should execute:

    cd installation directory

    source set_env_path.sh

  2. If there is no problem with the environment variables, check if the library exists by executing:

    cd /opt/MVS/lib/64

    ls -lh

How to fix error "ld:-lMvCameraControl cannot find libMvCameraControl library" when compiling?

Cause

The environment variables of current console do not take effect after installation.

Solution

  1. Check if all SDK environment variables take effect by executing:

    echo $MVCAM_COMMON_RUNENV

    If the path to relative SDK is not printed, you should execute:

    cd installation directory

    source set_env_path.sh

  2. If there is no problem with the environment variables, check if the library exists by executing:

    cd /opt/MVS/lib/64

    ls -lh